// ** Third Party Components
import { FileText } from 'react-feather'
import { UncontrolledTooltip } from 'reactstrap'

export let data

// ** Get initial Data
data = [
  {
    id: '1',
    name: '信息部',
    person: '12',
  },
  {
    id: '2',
    name: '管理部',
    person: '12',
  },
  {
    id: '3',
    name: '生产部',
    person: '22',
  },
]

const statusEnum = {
  0: '#ea5455',
  1: '#56affd',
}
// ** Table Common Column
export const columns = (handleEdit, handleDelete) => [
  {
    name: '行号',
    minWidth: '100px',
    cell: (row, a) => a + 1,
  },
  {
    name: '部门名称',
    minWidth: '150px',
    selector: (row) => row.name,
  },
  {
    name: '职工人数',
    minWidth: '150px',
    selector: (row) => row.number,
  },
  {
    name: '操作',
    width: '200px',
    selector: (row) => (
      <div
        className="column-action d-flex align-items-center"
        style={{ color: '#7367f0' }}
      >
        <div
          className="ms-50 cursor-pointer"
          onClick={() => {
            handleEdit(row._id)
          }}
        >
          编辑
        </div>
        <div
          className="ms-50 cursor-pointer"
          onClick={() => {
            handleDelete(row._id)
          }}
        >
          删除
        </div>
      </div>
    ),
  },
]
